import axios from '@/utils/axios'
const api ={
    user:{
        login:(params)=>axios.post('/api/login',params),
        message_code:(params)=>axios.get('/api/message_code',params)
    },
    home:{
        banner:()=>axios.get('/api/banner'),
        tabmenu: () =>axios.get('/api/tabmenu')
    },
    product:{
        list:(params)=>axios.get('/api/products',params),
        classify: () => axios.get('/api/classify'),
       // detail:(id)=>axios.get(`/api/products/${id}`),
       // suggestions:(keyword)=>axios.get('/api/searchSuggestions',{keyword})
    },
    car:{
        add:params=>axios.post('/api/car',params),
        list:()=> axios.get('/api/car'),
        update:(id,params)=>axios.put(`/api/car/${id}`,params),
    }
}
export default  api
